package cn.chiship.framework.third.biz.wxpub.entity;

import java.io.Serializable;

/**
 * @author lijian
 */
public class ThirdWechatArticle implements Serializable {
    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private String id;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Long gmtCreated;

    /**
     * 更新时间
     *
     * @mbg.generated
     */
    private Long gmtModified;

    /**
     * 逻辑删除（0：否，1：是）
     *
     * @mbg.generated
     */
    private Byte isDeleted;

    private String appId;

    /**
     * 标题
     *
     * @mbg.generated
     */
    private String title;

    /**
     * 作者
     *
     * @mbg.generated
     */
    private String author;

    /**
     * 分类
     *
     * @mbg.generated
     */
    private String categoryId;

    private String photo;

    /**
     * 摘要
     *
     * @mbg.generated
     */
    private String summary;

    /**
     * 附件
     *
     * @mbg.generated
     */
    private String attachment;

    /**
     * 是否原创  0 否 1 是
     *
     * @mbg.generated
     */
    private Byte isOriginal;

    /**
     * 摘抄自
     *
     * @mbg.generated
     */
    private String extractFrom;

    /**
     * 类型  0 图片  1 语音  2 视频  3 文本  4 图文
     *
     * @mbg.generated
     */
    private Byte resourceType;

    /**
     * 媒体ID 来自微信
     *
     * @mbg.generated
     */
    private String mediaId;

    /**
     * 留言 0 不开启留言  1 所有人 2 仅粉丝
     *
     * @mbg.generated
     */
    private Byte leavingMessage;

    /**
     * 正文
     *
     * @mbg.generated
     */
    private String contentBody;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getGmtCreated() {
        return gmtCreated;
    }

    public void setGmtCreated(Long gmtCreated) {
        this.gmtCreated = gmtCreated;
    }

    public Long getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Long gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Byte getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Byte isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public Byte getIsOriginal() {
        return isOriginal;
    }

    public void setIsOriginal(Byte isOriginal) {
        this.isOriginal = isOriginal;
    }

    public String getExtractFrom() {
        return extractFrom;
    }

    public void setExtractFrom(String extractFrom) {
        this.extractFrom = extractFrom;
    }

    public Byte getResourceType() {
        return resourceType;
    }

    public void setResourceType(Byte resourceType) {
        this.resourceType = resourceType;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public Byte getLeavingMessage() {
        return leavingMessage;
    }

    public void setLeavingMessage(Byte leavingMessage) {
        this.leavingMessage = leavingMessage;
    }

    public String getContentBody() {
        return contentBody;
    }

    public void setContentBody(String contentBody) {
        this.contentBody = contentBody;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", gmtCreated=").append(gmtCreated);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", appId=").append(appId);
        sb.append(", title=").append(title);
        sb.append(", author=").append(author);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", photo=").append(photo);
        sb.append(", summary=").append(summary);
        sb.append(", attachment=").append(attachment);
        sb.append(", isOriginal=").append(isOriginal);
        sb.append(", extractFrom=").append(extractFrom);
        sb.append(", resourceType=").append(resourceType);
        sb.append(", mediaId=").append(mediaId);
        sb.append(", leavingMessage=").append(leavingMessage);
        sb.append(", contentBody=").append(contentBody);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ThirdWechatArticle other = (ThirdWechatArticle) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGmtCreated() == null ? other.getGmtCreated() == null : this.getGmtCreated().equals(other.getGmtCreated()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getAuthor() == null ? other.getAuthor() == null : this.getAuthor().equals(other.getAuthor()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getPhoto() == null ? other.getPhoto() == null : this.getPhoto().equals(other.getPhoto()))
            && (this.getSummary() == null ? other.getSummary() == null : this.getSummary().equals(other.getSummary()))
            && (this.getAttachment() == null ? other.getAttachment() == null : this.getAttachment().equals(other.getAttachment()))
            && (this.getIsOriginal() == null ? other.getIsOriginal() == null : this.getIsOriginal().equals(other.getIsOriginal()))
            && (this.getExtractFrom() == null ? other.getExtractFrom() == null : this.getExtractFrom().equals(other.getExtractFrom()))
            && (this.getResourceType() == null ? other.getResourceType() == null : this.getResourceType().equals(other.getResourceType()))
            && (this.getMediaId() == null ? other.getMediaId() == null : this.getMediaId().equals(other.getMediaId()))
            && (this.getLeavingMessage() == null ? other.getLeavingMessage() == null : this.getLeavingMessage().equals(other.getLeavingMessage()))
            && (this.getContentBody() == null ? other.getContentBody() == null : this.getContentBody().equals(other.getContentBody()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGmtCreated() == null) ? 0 : getGmtCreated().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getAuthor() == null) ? 0 : getAuthor().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getPhoto() == null) ? 0 : getPhoto().hashCode());
        result = prime * result + ((getSummary() == null) ? 0 : getSummary().hashCode());
        result = prime * result + ((getAttachment() == null) ? 0 : getAttachment().hashCode());
        result = prime * result + ((getIsOriginal() == null) ? 0 : getIsOriginal().hashCode());
        result = prime * result + ((getExtractFrom() == null) ? 0 : getExtractFrom().hashCode());
        result = prime * result + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
        result = prime * result + ((getMediaId() == null) ? 0 : getMediaId().hashCode());
        result = prime * result + ((getLeavingMessage() == null) ? 0 : getLeavingMessage().hashCode());
        result = prime * result + ((getContentBody() == null) ? 0 : getContentBody().hashCode());
        return result;
    }
}